import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';

export const columns: BasicColumn[] = [
    {
    title: '单据编号',
    dataIndex: 'billNo'
   },
   {
    title: '部门id',
    dataIndex: 'deptId'
   },
   {
    title: '部门名称',
    dataIndex: 'deptName'
   },
   {
    title: '资产数量',
    dataIndex: 'assetsNum'
   },
   {
    title: '初盘异常数量',
    dataIndex: 'preliminaryBadNum'
   },
   {
    title: '初盘数量',
    dataIndex: 'preliminaryNum'
   },
   {
    title: '复盘数量',
    dataIndex: 'doubleQuotationNum'
   },
   {
    title: '复盘异常数量',
    dataIndex: 'doubleQuotationBadNum'
   },
   {
    title: '开始时间',
    dataIndex: 'startTime'
   },
   {
    title: '结束数据',
    dataIndex: 'endTime'
   },
   {
    title: '盘点状态',
    dataIndex: 'status'
   },
   {
    title: '唯一值',
    dataIndex: 'uniqueId'
   },
   {
    title: '申请id',
    dataIndex: 'startId'
   },
   {
    title: '初盘状态，0正常，1异常',
    dataIndex: 'preliminaryStatus'
   },
];

export const searchFormSchema: FormSchema[] = [
 {
    label: '单据编号',
    field: 'billNo',
    component: 'Input'
  },
 {
    label: '部门id',
    field: 'deptId',
    component: 'InputNumber'
  },
];

export const formSchema: FormSchema[] = [
  // TODO 主键隐藏字段，目前写死为ID
  {label: '', field: 'id', component: 'Input', show: false},
  {
    label: '单据编号',
    field: 'billNo',
    component: 'Input',
  },
  {
    label: '部门id',
    field: 'deptId',
    component: 'InputNumber',
  },
  {
    label: '部门名称',
    field: 'deptName',
    component: 'Input',
  },
  {
    label: '资产数量',
    field: 'assetsNum',
    component: 'InputNumber',
  },
  {
    label: '初盘异常数量',
    field: 'preliminaryBadNum',
    component: 'InputNumber',
  },
  {
    label: '初盘数量',
    field: 'preliminaryNum',
    component: 'InputNumber',
  },
  {
    label: '复盘数量',
    field: 'doubleQuotationNum',
    component: 'InputNumber',
  },
  {
    label: '复盘异常数量',
    field: 'doubleQuotationBadNum',
    component: 'InputNumber',
  },
  {
    label: '开始时间',
    field: 'startTime',
    component: 'DatePicker',
    componentProps: {
      showTime: true,
      valueFormat: 'YYYY-MM-DD hh:mm:ss',
    },
  },
  {
    label: '结束数据',
    field: 'endTime',
    component: 'DatePicker',
    componentProps: {
      showTime: true,
      valueFormat: 'YYYY-MM-DD hh:mm:ss',
    },
  },
  {
    label: '盘点状态',
    field: 'status',
    component: 'Input',
  },
  {
    label: '唯一值',
    field: 'uniqueId',
    component: 'Input',
  },
  {
    label: '申请id',
    field: 'startId',
    component: 'Input',
  },
  {
    label: '初盘状态，0正常，1异常',
    field: 'preliminaryStatus',
    component: 'InputNumber',
  },
];
